// ==UserScript== // @name 计时器掌控者|视频广告跳过|视频广告加速器 // @name:en TimerHooker // @namespace https://gitee.com/HGJing/everthing-hook/ // @homepageURL https://timer.palerock.cn // @version 2.0.11 // @description 控制网页计时器速度|加速跳过页面计时广告|视频快进(慢放)|跳过广告|支持几乎所有网页. // @description:en it can hook the timer speed to change. // @include * // @author Cangshi // @run-at document-start // @grant unsafeWindow // @grant GM_setValue // @grant GM_getValue // @grant GM_listValues // @grant GM_deleteValue // @grant GM_addValueChangeListener // @grant GM_removeValueChangeListener // @grant GM_log // @grant GM_registerMenuCommand // @grant GM_unregisterMenuCommand // @grant GM_openInTab // @grant GM_xmlhttpRequest // @grant GM_getTab // @grant GM_saveTab // @grant GM_notification // @grant GM_setClipboard // @grant GM.deleteValue // @grant GM.getValue // @grant GM.listValues // @grant GM.setValue // @grant GM.getResourceUrl // @grant GM.notification // @grant GM.registerMenuCommand // @grant GM.xmlHttpRequest // ==/UserScript== !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).$hookTimer=e()}(this,(function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:1/0,n=Array.prototype.flat||function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1/0;if(t<1)return this;var e=[],r=t-1;return this.forEach((function(t){t instanceof Array?e=e.concat(n.call(t,r)):e.push(t)})),e};return n.call(t,e)}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&void 0!==arguments[2]&&!arguments[2]?t:A(t)),r=n[e];return"function"==typeof r?r.bind(t):n[e]}(e.conditions||[],"reduce")((function(e,n){return e||Object.entries(n).every((function(e){var n=w(e,2),r=n[0],i=n[1];return t[r]===i}))}),!1)}var E=window,j=new Proxy({},{get:function(t,e){var n=["GM",e].join("_");return E[n]?E[n]:E.GM&&E.GM[e]?E.GM[e]:void 0}}),D=function(){if(!R()){for(var t=arguments.length,e=new Array(t),n=0;n1&&void 0!==arguments[1]&&arguments[1];if(0===t&&(t=this.defaultRate),t&&(t!==this.rate||e)&&t>0&&(this.rate=t,this.onRateChanged(t)),null==t){var n=prompt("输入欲改变计时器变化倍率(当前:"+this.rate+")");n&&this.setSpeed(parseFloat(n))}}},{key:"speedDown",value:function(t){null==t&&(t=this.getConfig("decrementRate")),this.setSpeed(this.rate-t)}},{key:"speedUp",value:function(t){null==t&&(t=this.getConfig("incrementRate")),this.setSpeed(this.rate+t)}},{key:"speedDivide",value:function(t){null==t&&(t=this.getConfig("divideRate")),this.setSpeed(this.rate/(t||1))}},{key:"speedMultiply",value:function(t){null==t&&(t=this.getConfig("multiplyRate")),this.setSpeed(this.rate*(t||1))}},{key:"onRateChanged",value:function(t){D("Timer speed rate changed to:",t),this.sentChangesToIframe(),this.getAllActivateModules().filter((function(t){return t.onRateChange})).forEach((function(e){e.onRateChange(t)}))}},{key:"beginInTimeCheck",value:function(){var t=this;this.keptInTime&&(this.inTimeCheckId=this.setIntervalOrigin.call(this.getWindow(),(function(){t.rate&&1!==t.rate&&t.setSpeed(t.rate,!0)}),this.keptInterval))}},{key:"catchOriginMethod",value:function(){this.setIntervalOrigin=this.getWindow().setInterval,this.clearIntervalOrigin=this.getWindow().clearInterval}},{key:"keptInTime",get:function(){return this.getConfig("keptInTime")}},{key:"keptInterval",get:function(){return this.getConfig("keptInterval")}},{key:"defaultRate",get:function(){return this.getConfig("defaultRate")}},{key:"bootstrap",value:function(){"preparing"===this.state&&(this.catchOriginMethod(),this.listenParentEvent(),this.launchModules(this.getAllModules()),this.setSpeed(this.defaultRate),this.beginInTimeCheck(),this.waitForModulesLoad(),this.state="started")}},{key:"launchModules",value:function(t){var e=this;t.filter((function(t){return t.autoActivate})).forEach((function(t){var n=t.moduleIdentityName;e.deactivateModules.includes(n)&&!t.isCoreModule||e.activateModule(n)}))}},{key:"registerModules",value:function(t){var e=this;return t.filter((function(t){var n=t.moduleIdentityName;return n&&e.registerModule(t,t.isOnlyOuterIframe),n}))}},{key:"waitForModulesLoad",value:function(){var t=this,e=this.getWindow().___hooks_preModules||[];e.length>0&&this.launchModules(this.registerModules(e)),this.getWindow()[M]=1,this.getWindow().addEventListener(M,(function(e){e.detail&&e.detail.moduleIdentityName&&t.launchModules(t.registerModules([e.detail]))}))}},{key:"exportOuter",value:function(){var t=this;this.getWindow()._OxA?(this.getWindow().$hookTimer=this,this.getWindow()._OxA=this):Object.defineProperty(this.getWindow(),"_OxA",{get:function(){return 1},set:function(e){"_OxA"===e&&(t.getWindow().$hookTimer=t)}})}},{key:"listenParentEvent",value:function(){var t=this;v()&&this.getWindow().addEventListener("message",(function(e){var n=e.data;(n.type||"")===q&&t.setSpeed(n.rate||0)}))}},{key:"deactivateModules",get:function(){return this.getConfig("deactivateModules")}},{key:"sentChangesToIframe",value:function(){var t=this.getWindow().document,e=t.querySelectorAll("iframe")||[],n=t.querySelectorAll("frame");if(e.length)for(var r=0;r1&&void 0!==arguments[1]&&arguments[1];e&&v()||(this.modules[t.moduleIdentityName]=t,t.mountHost(this))}},{key:"getAllActivateModules",value:function(){return Object.values(this.modules).filter((function(t){return t.isActive}))}},{key:"getAllModules",value:function(){return Object.values(this.modules)}},{key:"getWindow",value:function(){return y()}}]),e}());var G=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function z(t,e){return t(e={exports:{}},e.exports),e.exports}var Y=z((function(t){function e(n,r){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(n,r)}t.exports=e}));var $=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Y(t,e)},K=z((function(t){function e(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=e=function(t){return typeof t}:t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(n)}t.exports=e}));var J=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var Q=function(t,e){return!e||"object"!==K(e)&&"function"!=typeof e?J(t):e},X=z((function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e}));var Z=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&void 0!==arguments[2]?arguments[2]:"initAssign",r=Object.getPrototypeOf(e);return Object.setPrototypeOf(t,r),"function"==typeof r[n]&&r[n].call(t,e),t}function pt(t){return Number(Math.random().toString().substr(3,t)+Date.now()).toString(36)}function yt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=X(t);if(e){var i=X(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Q(this,n)}}!function(t,e){t(e={exports:{}},e.exports)}((function(t){function e(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=e=function(t){return typeof t}:t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(n)}t.exports=e}));var vt={instanceType:function(t){$(n,t);var e=yt(n);function n(){return G(this,n),e.apply(this,arguments)}return at(n,[{key:"initAssign",value:function(t){this.id=pt(7),function(t,e,n,r){e&&void 0!==e[n]?t[n]=e[n]:"function"==typeof r&&(t[n]=r())}(this,t,"uniqueId",(function(){return pt(7)}))}},{key:"bind",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return dt((e=ct(X(n.prototype),"bind",this)).call.apply(e,[this,t].concat(it(r))),this)}},{key:"before",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.surround({before:t,adaptAsync:e})}},{key:"after",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.surround({after:t,adaptAsync:e})}},{key:"surround",value:function(t){var e=t.before,n=void 0===e?void 0:e,r=t.after,i=void 0===r?void 0:r,o=t.onError,a=void 0===o?void 0:o,u=t.adaptAsync,c=void 0!==u&&u,l=this;return"function"!=typeof l?l:dt((function(){for(var t=this,e=arguments.length,r=new Array(e),o=0;o0&&void 0!==arguments[0]?arguments[0]:{};return this.registerClass((function(e){var n=function(t){$(n,t);var e=yt(n);function n(){return G(this,n),e.apply(this,arguments)}return n}(e);return Object.assign(n.prototype,t),n}))}},{key:"registerClass",value:function(t){var e=t(this.constructor),n=this.bind(this);if(Object.setPrototypeOf(n,e.prototype),"function"!=typeof e||!(n instanceof this.constructor))throw new Error("Registered class must extend FunctionInstance");return n}}]),n}(ht(Function))};function gt(t,e){var n=function(){for(var e=arguments.length,n=new Array(e),r=0;r2&&void 0!==arguments[2]?arguments[2]:"initAssign",r=e.prototype;Object.setPrototypeOf(t,r),"function"==typeof r[n]&&r[n].call(t)}(n,(e=Object.assign({},vt,e)).instanceType),n}var mt,bt={protect:!1,syncDesc:!0,native:!1},wt=Object.defineProperty,kt=Object.defineProperties;function xt(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=t[e];if("function"==typeof i){var o=Object.assign({},bt,r),a=o.native,u=n(a?i:gt(i));t[e]=a?u:function(){for(var t=arguments.length,e=new Array(t),n=0;n4&&void 0!==arguments[4]?arguments[4]:{};return xt(t,e,(function(t){return t[n](r)}),i)}function Rt(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Ot(t,e,"before",n,r)}function Mt(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return xt(t,e,n,Object.assign({},r,{native:!0}))}function _t(t,e){wt.call(Object,t,e,{writable:!1})}function At(t,e){kt.call(Object,e,{toString:{enumerable:!1,writable:!0,value:function(){return t.toString()}},toLocaleString:{enumerable:!1,writable:!0,value:function(){return t.toLocaleString()}}})}function St(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=c(t);if(e){var i=c(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u(this,n)}}!function(t){t.TIMEOUT="timeout",t.INTERVAL="interval"}(mt||(mt={}));var It=function(e){o(a,e);var i=St(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function Dt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:"+",n=t.split(e).map((function(t){return t.trim()})).filter((function(t){return t})),r={code:n.pop()||"UNKNOWN_KEY"};return n.forEach((function(t){r[t+"Key"]=!0})),r}(t)}))),n;var e,n}))}},{key:"moduleIdentityName",get:function(){return"shortcutKey"}},{key:"declareConfigs",value:function(){return[{type:f.ARRAY,itemType:f.SHORTCUT,key:"shortcutExpressions.+",default:["ctrl + Equal","meta + Equal","ctrl + Period","meta + Period"]},{type:f.ARRAY,itemType:f.SHORTCUT,key:"shortcutExpressions.-",default:["ctrl + Minus","meta + Minus","ctrl + Comma","meta + Comma"]},{type:f.ARRAY,itemType:f.SHORTCUT,key:"shortcutExpressions.*",default:["alt + Equal","alt + Period"]},{type:f.ARRAY,itemType:f.SHORTCUT,key:"shortcutExpressions./",default:["alt + Minus","alt + Comma"]},{type:f.ARRAY,itemType:f.SHORTCUT,key:"shortcutExpressions.reset",default:["ctrl + Digit0","meta + Digit0","alt + Digit0"]},{type:f.ARRAY,itemType:f.SHORTCUT,key:"shortcutExpressions.custom",default:["ctrl + Digit9","meta + Digit9"]}]}}]),i}(U);function Bt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=c(t);if(e){var i=c(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u(this,n)}}function Lt(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Ut(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ut(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function Ut(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n3&&void 0!==arguments[3]?arguments[3]:{})}(this.window.Element.prototype,"attachShadow",(function(e){var n=e.lastValue;return t.extraElements.push(n),n}))}},{key:"querySelectorAll",value:function(t){return g(this.extraElements.map((function(e){return Wt(e.querySelectorAll(t))})))}},{key:"moduleIdentityName",get:function(){return"shadowDOM"}},{key:"isCoreModule",get:function(){return!0}}]),a}(N);function Gt(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return zt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zt(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function zt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=16?16:e<=.065?.065:e,this.unlockPlaybackRate(t),t.playbackRate=e,1!==e&&this.lockPlaybackRate(t)}},{key:"lockPlaybackRate",value:function(t){var e=(this.definitionModule||{}).definePropertyOrigin;(void 0===e?Object.defineProperty:e).call(Object,t,"playbackRate",{configurable:!0,get:function(){return 1},set:function(){}})}},{key:"unlockPlaybackRate",value:function(t){delete t.playbackRate,delete t.playbackRate,delete t.playbackRate}},{key:"definitionModule",get:function(){return this.getDependencyModule("definition")}},{key:"preventPlaybackRateLock",value:function(){var t=this.definitionModule;t?t.applyDefineRole((function(t){if(t.target instanceof HTMLVideoElement&&"playbackRate"===t.key)return P("已阻止对该网站视频视频倍率的锁定"),!0})):P("`Video Speed Module`, dependency: `definition` module is required.")}},{key:"allVideoElements",get:function(){var t=this.getDependencyModule("shadowDOM");return t||P("`Video Speed Module`, dependency: `shadowDOM` module is required."),[].concat(Wt(t?t.querySelectorAll("video"):[]),Wt(this.document.querySelectorAll("video")))}},{key:"moduleIdentityName",get:function(){return"videoSpeed"}}]),i}(U);function Kt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=c(t);if(e){var i=c(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u(this,n)}}var Jt=function(e){o(i,e);var r=Kt(i);function i(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__CM";return t(this,i),(n=r.call(this)).storage=e,n.prefix=o,n}return n(i,[{key:"isCoreModule",get:function(){return!0}},{key:"openPage",value:function(t){"function"==typeof j.openInTab?j.openInTab(t,{active:!0}):this.window.open(t)}},{key:"init",value:function(){var t=this;B(c(i.prototype),"init",this).call(this),"function"==typeof j.registerMenuCommand&&(j.registerMenuCommand("主页",(function(){t.openPage("https://timer.palerock.cn")})),j.registerMenuCommand("打开配置页面",(function(){t.openPage("https://timer.palerock.cn/configuration")})))}},{key:"getAllConfigs",value:function(){var t=this;return this.getDeclaredConfigurations().map((function(e){var n=t.getValue(e.namespace,e.key);return Object.assign({},e,{value:null!=n?n:e.default})}))}},{key:"getDeclaredConfigurations",value:function(){return g([this.host.declareConfigs().map((function(t){return Object.assign({},t,{namespace:"host"})}))].concat(Wt(this.host.getAllActivateModules().map((function(t){return t.declareConfigs().map((function(e){return Object.assign({},e,{namespace:t.moduleIdentityName,modelName:t.moduleName})}))})))))}},{key:"moduleIdentityName",get:function(){return"configs"}},{key:"saveAllConfigs",value:function(t){var e=this;t.forEach((function(t){var n;e.setValue(t.namespace,t.key,null!==(n=t.value)&&void 0!==n?n:t.default)}))}},{key:"getValue",value:function(t,e){if(this.available())return this.storage.get([this.prefix,t,e].join("_"))}},{key:"setValue",value:function(t,e,n){this.available()&&this.storage.set([this.prefix,t,e].join("_"),n)}},{key:"available",value:function(){return!!this.storage&&this.storage.available()}},{key:"resetAll",value:function(){var t=this;this.storage.list().filter((function(e){return e.startsWith(t.prefix)})).forEach((function(e){t.storage.remove(e)}))}}]),i}(N),Qt=function(){function e(){t(this,e),l(this,"isAvailable",void 0)}return n(e,[{key:"get",value:function(t){return j.getValue(t)}},{key:"list",value:function(){return j.listValues()}},{key:"remove",value:function(t){j.deleteValue(t)}},{key:"set",value:function(t,e){j.setValue(t,e)}},{key:"available",value:function(){return null==this.isAvailable&&(this.isAvailable=[a(j.setValue),a(j.getValue),a(j.listValues),a(j.deleteValue)].every((function(t){return"function"===t}))),this.isAvailable}}]),e}();function Xt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=c(t);if(e){var i=c(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u(this,n)}}var Zt=function(e){o(a,e);var i=Xt(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u2?this.rate.toFixed(2):this.rate.toString()}},{key:"showSuspendedBall",get:function(){return this.getConfig("showSuspendedBall")}},{key:"deeplyColor",get:function(){return this.getConfig("deeplyColor")}},{key:"genElement",value:function(){var t=this.document.createElement("div");t.innerHTML=(this.showSuspendedBall?'
\n
\n x'+this.displayNum+'\n
\n
>
\n
<
\n
>>
\n
<<
\n
O
\n
\n':"")+'
\n
x'+this.displayNum+"
\n
";var e=this;return Object.keys(this.clickMapper).forEach((function(n){var r=e.clickMapper[n],i=t.getElementsByClassName(n)[0];i&&(i.onclick=function(){r(e.host,e.rate)})})),t}},{key:"element",value:function(){return this.nodeElement||(this.nodeElement=this.genElement()),this.nodeElement}},{key:"style",value:function(){var t=this.position,e=this.positionOffset,n="right"===t?"left":"right",r="left"===t;return"\n ._th-container ._th-item {\n margin-bottom: 3px;\n position: relative;\n width: 0;\n height: 0;\n cursor: pointer;\n opacity: .3;\n background-color: aquamarine;\n border-radius: 100%;\n text-align: center;\n line-height: 30px;\n -webkit-transition: all .35s;\n -o-transition: all .35s;\n transition: all .35s;\n ".concat(n,": 30px;\n }\n\n ._th-container ._th-item, ._th-container ._th-click-hover, ._th_cover-all-show-times ._th_times {\n -webkit-box-shadow: ").concat(this.deeplyColor?"4px 5px 10px 6px #b2b2b2":"-3px 4px 12px -5px black",";\n box-shadow: ").concat(this.deeplyColor?"4px 5px 10px 6px #b2b2b2":"-3px 4px 12px -5px black",";\n }\n\n ._th-container:hover ._th-item._item-x2 {\n margin-").concat(t,": 18px;\n width: 40px;\n height: 40px;\n line-height: 40px\n }\n\n ._th-container:hover ._th-item._item-x-2 {\n margin-").concat(t,": 17px;\n width: 38px;\n height: 38px;\n line-height: 38px\n }\n\n ._th-container:hover ._th-item._item-xx2 {\n width: 36px;\n height: 36px;\n margin-").concat(t,": 16px;\n line-height: 36px\n }\n\n ._th-container:hover ._th-item._item-xx-2 {\n width: 32px;\n height: 32px;\n line-height: 32px;\n margin-").concat(t,": 14px\n }\n\n ._th-container:hover ._th-item._item-reset {\n width: 30px;\n line-height: 30px;\n height: 30px;\n margin-").concat(t,": 10px\n }\n\n ._th-click-hover {\n position: relative;\n -webkit-transition: all .5s;\n -o-transition: all .5s;\n transition: all .5s;\n height: 45px;\n width: 45px;\n cursor: pointer;\n opacity: .6;\n border-radius: 100%;\n background-color: aquamarine;\n text-align: center;\n line-height: 45px;\n ").concat(n,": 0\n }\n\n ._th-container:hover {\n ").concat(t,": -5px\n }\n\n ._th-container {\n font-size: 12px;\n -webkit-transition: all .5s;\n -o-transition: all .5s;\n transition: all .5s;\n ").concat(t,": -30px;\n top: ").concat(e,";\n position: fixed;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n z-index: 100000;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: flex;\n width: 58px;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: ").concat(r?"normal":"reverse",";\n -ms-flex-direction: ").concat(r?"row":"row-reverse",";\n flex-direction: ").concat(r?"row":"row-reverse",";\n }\n\n ._th-container ._th-item:hover {\n opacity: .8;\n background-color: #5fb492;\n color: aliceblue\n }\n\n ._th-container ._th-item:active {\n opacity: .9;\n background-color: #1b3a26;\n color: aliceblue\n }\n\n ._th-container:hover ._th-click-hover {\n opacity: .8\n }\n\n ._th-container:hover ._th-item {\n opacity: .6;\n ").concat(n,": 0\n }\n\n ._th-container ._th-click-hover:hover {\n opacity: .8;\n background-color: #5fb492;\n color: aliceblue\n }\n\n ._th_cover-all-show-times {\n position: fixed;\n top: 0;\n ").concat(n,": 0;\n width: 100%;\n height: 100%;\n z-index: 99999;\n opacity: 1;\n font-weight: 900;\n font-size: 30px;\n color: #4f4f4f;\n background-color: rgba(0, 0, 0, 0.1)\n }\n\n ._th_cover-all-show-times._th_hidden {\n z-index: -99999;\n opacity: 0;\n -webkit-transition: 1s all;\n -o-transition: 1s all;\n transition: 1s all\n }\n\n ._th_cover-all-show-times ._th_times {\n width: 300px;\n height: 300px;\n border-radius: 50%;\n background-color: rgba(127, 255, 212, 0.51);\n text-align: center;\n line-height: 300px;\n position: absolute;\n top: 50%;\n ").concat(n,": 50%;\n margin-top: -150px;\n margin-").concat(n,": -150px\n }\n ")}},{key:"onUiRateChange",value:function(t){if(B(c(a.prototype),"onUiRateChange",this).call(this,t),this.nodeElement){var e=this.nodeElement.querySelector("._th-click-hover")||{},n=this.nodeElement.querySelector("._th_times")||{},r=this.displayNum;e.innerHTML="x"+r,n.innerHTML="x"+r;var i=this.nodeElement.querySelector("._th_cover-all-show-times")||{};i.className="_th_cover-all-show-times",this.setTimeoutOrigin.bind(this.window)((function(){i.className="_th_cover-all-show-times _th_hidden"}),100)}}},{key:"position",get:function(){return this.getConfig("position")}},{key:"positionOffset",get:function(){return this.getConfig("positionOffset")}},{key:"declareConfigs",value:function(){return[{key:"position",type:f.STRING,default:"left"},{key:"positionOffset",type:f.STRING,default:"20%"},{key:"showSuspendedBall",type:f.BOOLEAN,default:!0,title:"Show Suspended Ball"},{key:"deeplyColor",type:f.BOOLEAN,default:!0,title:"Deeply Color"}]}}]),a}(H),te=new F;return te.exportOuter(),te.registerModule(new Jt(new Qt)),te.registerModule(new Ht),te.registerModule(new Ft),te.registerModule(new It),te.registerModule(new Et),te.registerModule(new $t),te.registerModule(new Nt,!0),te.registerModule(new Zt,!0),te.bootstrap(),te}));